'use strict';

const Controller = require('egg').Controller;

class ScoreController extends Controller {
  async add() {
    const { ctx } = this;
    const data = await ctx.service.score.add()
    ctx.body = data
  }

  async update() {
    const data = await this.ctx.service.score.update()
    this.ctx.body = data;
  }

  async delete() {
    const data = await this.ctx.service.score.delete()
    this.ctx.body = data;
  }

  async search() {
    const data = await this.ctx.service.score.search()
    this.ctx.body = data;
  }

  async page() {
    const data = await this.ctx.service.score.page()
    this.ctx.body = data;
  }

  async findGrade() {
    const data = await this.ctx.service.score.findGrade();
    this.ctx.body = data;
  }
}

module.exports = ScoreController;
